import * as THREE from 'three'
import Experience from '../class/Experience'
import Ground from '../group/Ground';
import Map from '../group/Map';
export default class Group {
    constructor() {
        this.experience = new Experience();
        // 所有组的合集
        this.group = new THREE.Group();

        // 地面组
        this.ground = new Ground();

        // 地图组
        this.map = new Map();
        // 添加子组
        this.group.add(this.ground.group);
        this.group.add(this.map.group);
        // this.group.add(this.mapGroup)
        // 将所有组添加进场景
        this.experience.scene.add(this.group)
    }

    // 更新所有组需要更新的东西
    update(){
        this.ground.update();
        this.map.update();
    }
}